<template>
  <div>
    <el-drawer
      title
      :visible.sync="drawer"
      :direction="direction"
      :before-close="handleClose"
      custom-class="drawer-info"
    >
      <div class="from-item">
        <h5 class="from-title">基本信息</h5>
        <div class="form-item">
          <label class="form-item-label">名称:</label>
          <div class="form-item-content">{{ infoList.name }}</div>
        </div>
        <div class="form-item">
          <label class="form-item-label">是否超管:</label>
          <div class="form-item-content">否</div>
        </div>
        <div class="form-item">
          <label class="form-item-label">是否启用:</label>
          <div class="form-item-content">否</div>
        </div>
        <div class="form-item">
          <label class="form-item-label">备注:</label>
          <div class="form-item-content">{{ infoList.remark || infoRemask }}</div>
        </div>
      </div>
      <!-- <div class="info-item">
				<h5 class="from-title">其他信息</h5>
				<div class="form-item">
					<label class="form-item-label">名称:</label>
					<div class="form-item-content">名称名称</div>
				</div>
				<div class="form-item">
					<label class="form-item-label">上级部门:</label>
					<div class="form-item-content">名称名称</div>
				</div>
				<div class="form-item">
					<label class="form-item-label">备注:</label>
					<div class="form-item-content">名称名称</div>
				</div>
      </div>-->
    </el-drawer>
  </div>
</template>
<script>
import { roleInfo } from "@/api/auth/sysrole.js"
export default {
  data () {
    return {
      drawer: true,
      direction: "rtl",
      infoList: {},
      infoRemask: "无",
    }
  },
  created () { },
  methods: {
    init (id) {
      if (id) {
        roleInfo(id).then(res => {
          this.infoList = res.data
        })
      }
      this.drawer = true
    },
    // 关闭抽屉
    handleClose (done) {
      done()
    },
  },
}
</script>
<style scoped></style>
